package Sequence;

public class BlutForce {
    public static boolean stringMatcher(String s,int pos,String t){
        int i,j,start;
        start = pos;
        i = start;
        j = 0;
        while(i<s.length()&&j<t.length()){
            if(s.charAt(i)==t.charAt(j)){
                i++;
                j++;
            }
            else{
                start++;
                i = start;
                j = 0;
            }
            if(j>=t.length())return true;
        }
        return false;
    }

    public static void main(String[] args){
        String s = "ababcabcacbab";
        String t = "abcac";
        System.out.printf("---"+stringMatcher(s,0,t));
    }
}
